import 'package:flutter/material.dart';
import '../../widget/app_bar.dart';
import '../../utils/utils.dart';

class Sport extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _SportState();
  }
}

class _SportState extends State<Sport> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
//      appBar: MyAppBar(
//        centerTitle: '运动',
//        isBack: false,
//        elevation: 1,
//      ),
      appBar: new AppBar(
        centerTitle: true,
        title: Text(
          '运动',
          style: TextStyle(fontSize: 16, color: Colors.black),
        ),
        elevation: 1,
        automaticallyImplyLeading: true,
      ),
      endDrawer: new Drawer(
        child: new Column(
          children: <Widget>[
            new UserAccountsDrawerHeader(
              accountName: new Text('winds'),
              accountEmail: new Text('heardown@163.com'),
              decoration: new BoxDecoration(
                  image: new DecorationImage(
                      image: new NetworkImage(
                          "http://t2.hddhhn.com/uploads/tu/201612/98/st93.png"))),
              currentAccountPicture: CircleAvatar(
                backgroundImage: AssetImage(Utils.getImgPath("demo/bg_class1")),
              ),
            ),
            new ListTile(
              leading: new Icon(Icons.refresh),
              title: new Text("刷新"),
            ),
            new ListTile(
              leading: new Icon(Icons.help),
              title: new Text("帮助"),
            ),
            new ListTile(
              leading: new Icon(Icons.chat),
              title: new Text("会话"),
            ),
            new ListTile(
              leading: new Icon(Icons.settings),
              title: new Text("设置"),
            ),
          ],
        ),
      ),
      body: Center(
        child: Text(
          "Sport",
          style: TextStyle(color: Colors.deepOrange, fontSize: 18),
        ),
      ),
    );
  }
}
